feat(hippocampal): v2 memory system — glossary, namespaces, rollback, auto-inject, daemon#2933
feat(hippocampal): v2 memory system — glossary, namespaces, rollback, auto-inject, daemon#2933cy2311 wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Thanks @cy2311 for taking the time to contribute. This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered. Please read |
There was a problem hiding this comment.
Code Review
This pull request updates the YOLO mode prompt markdown file by adding an instruction to execute actions directly without announcing or restating the current mode. It also changes the header level from H2 to H5. The reviewer recommends keeping the H2 header level to maintain consistency with other mode prompts.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| @@ -1,4 +1,4 @@ | |||
| ## Mode: YOLO | |||
| ##### Mode: YOLO | |||
There was a problem hiding this comment.
The header level was changed from ## (H2) to ##### (H5). To maintain consistency with other mode prompts (such as ## Mode: Agent and ## Mode: Plan) and to keep a clean hierarchy in the composed system prompt, it is recommended to keep this as an H2 header.
| ##### Mode: YOLO | |
| ## Mode: YOLO |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
c736324 to
63a0b3e
Compare
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
@cy2311 — thank you, there's a lot of good work here. We'd like to take it, but in pieces, because it bundles two very different kinds of change: The three fixes are wanted now. The YOLO-mode announcement suppression (#2922), the The memory crate needs a design conversation first. A new Closing nothing here — this PR can stay open as the reference while the split PRs land. |
… subagent conflict messages (#3020) Three targeted error-message improvements extracted from community PR #2933 (author cy2311), with additional model-not-found annotation: 1. dispatch.rs format_tool_error: pass through self-explanatory messages that already name the cause (mode switch, allow_shell, feature flag, denied by user) instead of appending a conflicting generic suffix. Fixes the Plan-mode double-message (#2657). 2. subagent/mod.rs session-name conflict: include elapsed time (started Ns ago / NmNs ago) so the parent can distinguish a live worker from a stale/failed earlier spawn (#2656). 3. subagent/mod.rs annotate_child_model_error: catch model-not-found patterns (Model Not Exist, does not exist, no such model, etc.) in the raw error text even when the taxonomy classifies them as Internal rather than Authorization/State (#2653). Closes #2653, #2656, #2657. Credit: cy2311 for the dispatch.rs and subagent conflict hunks from #2933. Co-authored-by: cy2311 <29836092+cy2311@users.noreply.github.com>
… denial and provider errors fix: harvest error-message fixes from PR #2933 — better tool denial + subagent conflict messages
… auto-inject, daemon Complete v2 overhaul of the hippocampal memory system: Storage layer (crates/memory/): - Schema migration system (schema_version table) for safe upgrades - Namespaces table for workspace/project-level isolation - Glossary table + fact_glossary/entity_glossary for keyword tagging - fact_versions table for rollback support (every update saves history) - New store methods: namespace CRUD, glossary CRUD, fact versioning, rollback, get_memory_stats, namespace-scoped queries - 5 new unit tests (namespace, glossary, versioning, rollback, stats) Agent tools (crates/tui/src/tools/): - memorize: new glossary_tags[] and namespace input parameters - recall: new namespace and glossary_tag filtering, glossary tag display - consolidate: NEW tool — stats/rollback/prune/merge actions System integration (crates/tui/src/core/engine.rs): - memory_context_block(): injects top-8 important facts + usage guidance into the system prompt on every refresh (cross-session awareness) - memory_daemon_loop(): background tokio task, prunes low-importance facts every 6 hours, logs memory statistics Prompt guidance (crates/tui/src/prompts/): - hippocampal_guidance.md: tells the model to auto-call memorize when it discovers architecture decisions, user preferences, etc. Design doc: MEMORY_DESIGN.md covers architecture decisions, comparison with Mem0 / Nocturne Memory / Awareness-Local, and future roadmap. Refs: Hmbown#2933, Hmbown#3234
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
v2 Update — Design Research CompleteHi @Hmbown, I took your advice from Discussion #3234 and did a deep research on how other projects implement memory systems before designing v2. Research Sources
Key Design Decisions (see MEMORY_DESIGN.md for full rationale)
v2 Changelog
Let me know what you think — happy to jump on WeChat to discuss further! |
Hippocampal Memory v2 — Glossary, Namespaces, Rollback, Auto-Inject, Background Daemon
This PR upgrades the hippocampal memory system from v1 (basic entity graph + FTS5) to a full-featured cross-session memory layer.
What's New
Storage Layer (
crates/memory/)schema_versiontable for safe upgradesnamespacestable — workspace/project-level isolationglossarytable — keyword/tag system with many-to-many links to facts and entitiesfact_versionstable — full version history, enabling rollback to any previous versionAgent Tools (
crates/tui/src/tools/)memorize— newglossary_tags[]andnamespaceparameters for structured taggingrecall— newnamespaceandglossary_tagfiltering, glossary tag display in resultsconsolidate— new tool with four actions:stats— memory usage reportrollback— restore a fact to a previous versionprune— delete low-importance facts (active forgetting)merge— deduplicate identical factsSystem Integration (
crates/tui/src/core/engine.rs)<memory_context>block on every refresh — the model sees cross-session knowledge without an explicitrecallcalltokio::spawn: prunes low-importance facts (importance < 0.3, age > 30 days) every 6 hours, logs memory statisticsmemorizewhen it discovers architecture decisions, user preferences, etc.Design Document
See
MEMORY_DESIGN.mdfor:Implementation Status
cargo check -p codewhale-memory✅cargo check -p codewhale-tui✅crates/memory/src/store.rs(4 original + 5 new)Changed Files
Refs: #2933, Discussion #3234